Skip to content

fix(id): five lib tests failing on main — fence span, tags socket close, archive references, two hosting-blind routing tests - #4631

Merged
dezren39 merged 2 commits into
mainfrom
fix/id-lib-tests
Nov 2, 2026
Merged

dezren39 merged 2 commits into
mainfrom
fix/id-lib-tests

Conversation

@dezren39

@dezren39 dezren39 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

All five id lib-test failures that currently fail the package's check phase on main (verified in the NixOS build: 2276 passed, 5 failed; all five reproduced identically outside the sandbox).

  • markdown test_newline_destination_protection_skips_literal_contexts: a closing fence line cleared the fence state during line-start classification, so its backticks fell into inline-span tracking and opened a phantom span that suppressed newline-destination protection for the rest of the document. Fence lines are now tracked and never treated as span syntax.
  • tags_ws websocket_caps_inbound_messages_and_keeps_tag_events_working: the forwarding loop only watched the broadcast channel; when the inbound side died (oversized-message error, disconnect, close frame) the drain task ended but nothing closed the socket. The loop now also ends when the drain task finishes.
  • fileops delete_after_repeated_replacements_removes_all_replaced_archives (id(fileops): repeated-replacement archive removal test fails — delete reports 1 archive instead of 2 #4574): archive_existing transferred the replaced file's metadata onto the new archive, and the transfer discards excluded keys from the source outright — so the archive.rename/archive.replace references left the live file on the first replacement, and a delete after repeated replacements only found the latest archive, orphaning the rest. The references are now snapshotted before the transfer, kept off the archive via the identity exclusion list, and restored onto the live name afterwards.
  • world_ws two_apps_bind_distinct_sockets and routes public_entry_point_honours_a_configured_binding: both handlers 404 when no world is hosted, so the world-less test state made the routing assertions measure hosting instead of routing. Both tests now host a lobby world.

Fixes #4574.

Verified locally (laptop): the five named tests pass, plus the full fileops module (9/9).

…se, two hosting-blind routing tests

- markdown: a closing fence line cleared the fence state before its
  backticks were classified, so they opened a phantom inline span that
  suppressed newline-destination protection for the rest of the doc.
  Track fence lines and never treat their backticks as span syntax.
- tags_ws: the forwarding loop only watched the broadcast channel, so
  when the inbound side died (disconnect, close frame, oversized
  message error) the socket stayed open forever. End the loop when
  the drain task finishes.
- world_ws two_apps_bind_distinct_sockets and routes
  public_entry_point_honours_a_configured_binding: both handlers 404
  when no world is hosted, so world-less test state made the routing
  assertions measure hosting instead. Host a lobby world in both.

The fifth failure, fileops delete_after_repeated_replacements, is
tracked separately in #4574.
@dezren39
dezren39 requested a review from a team as a code owner November 2, 2026 22:38
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 26 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d7a9f5ef-5bb8-4638-82d3-389ba7e33a4d
Commits

Reviewing files that changed from the base of the PR and between 2f62ce6 and 4dba9a6.

Files selected for processing: 5
  • pkgs/id/src/fileops.rs
  • pkgs/id/src/web/markdown.rs
  • pkgs/id/src/web/routes.rs
  • pkgs/id/src/web/tags_ws.rs
  • pkgs/id/src/web/world_ws.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T23:06:00.625933Z 4dba9a6 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…#4574)

archive_existing transferred the replaced file's metadata onto the
new archive, and the transfer discards excluded keys from the source
outright. The archive.rename/archive.replace references therefore
left the live file on the first replacement (copied onto the archive,
then deleted from the live name), so a delete after repeated
replacements only ever found the latest archive and orphaned the
rest. Snapshot the references before the transfer, keep them off the
archive via the identity exclusion list, and restore them onto the
live name afterwards.
@dezren39 dezren39 changed the title fix(id): four lib tests failing on main — fence span, tags socket close, two hosting-blind routing tests fix(id): five lib tests failing on main — fence span, tags socket close, archive references, two hosting-blind routing tests Nov 2, 2026
@dezren39
dezren39 merged commit b3eb4ef into main Nov 2, 2026
2 checks passed
@dezren39
dezren39 deleted the fix/id-lib-tests branch November 2, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

id(fileops): repeated-replacement archive removal test fails — delete reports 1 archive instead of 2

1 participant